const mongoose = require("mongoose");
//  收到的赞表  like
module.exports = mongoose.model("like", {

  // dztime    点赞那一刻的时间
  dztime: {
    type: String,

  },
  user_id: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'user',
  },
  // user_idb   别人的user_id   需传参
  user_idb: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'user',
  },
  // recipe_id   菜谱id
  recipe_id: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'recipe',
  },
  // works_id  作品id      菜谱作品这两个id只能存在一个
  works_id: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'work',
  },
});